#ifndef THREAD_H_
#define THREAD_H_

#include "Common.h"

class Thread
{
    public:

        Thread();

        virtual ~Thread();

        virtual void *Process() = 0;

        pthread_t GetThreadID();

        int32 GetThreadNum();

        static void* Func(void* param);

        int32 Run(int32 threadNum = 0);

        int32 Join();

    private:

        pthread_t _threadId;

        int32 _threadNum;
};

#endif
